<template>
    <div>
        <h1>相加后的数字是：{{$store.state.count}}</h1>
        <button @click="add">加一</button>
    </div>
</template>
<script>
export default {
    methods:{
        add(){
            this.$store.commit('add')
        }
    }
}
</script>
